home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 49
/
Aminet 49 (2002)(GTI - Schatztruhe)[!][Jun 2002].iso
/
Aminet
/
util
/
misc
/
LC2.lha
/
src
/
LC2s.amos
/
LC2s.amosSourceCode
< prev
next >
Wrap
AMOS Source Code
|
2001-07-30
|
34KB
|
826 lines
Rem LOTTO CHECK version 2.0 Copy-right 1997 Lorence Lombardo.
Rem lory@subdimension.com
Rem This program is Free software; you can redistribute it and/or modify
Rem it under the terms of the GNU General Public License as published by
Rem the Free Software Foundation; either version 2 of the License, or
Rem (at your option) any later version.
Rem This program is distributed in the hope that it will be useful,
Rem but WITHOUT ANY WARRANTY; without even the implied warranty of
Rem MERCHANTABILITY OR FITNESS For A PARTICULAR PURPOSE. See the
Rem GNU General Public License For more details.
Rem You should have received a copy of the GNU General Public License
Rem along with this program; if not, write to the Free Software
Rem Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
Set Buffer 160 : On Error Goto TERROR : Break Off
Hide : BEEP=20 : LF$=Chr$(10) : PR$="PRT:"
FCH$="LOTTO CHECK (C) 1994 Lorence Lombardo."
FCH2$="LOTTO CHECK (C) 1997 Lorence Lombardo."
Rem **********D( T ,N, L )**** ticket,number,line ****
Rem NX=system GT= Games/ticket
TMX=100 : Dim D(TMX+1,25,12),X$(TMX+1),NX(TMX+1),GT(TMX+1),N(20),R(25),WN(25,12),WL(12),NC(45),WT(TMX),WTL(TMX,12)
Gosub CSCREEN : MD$="" : SC=1 : Z1=0 : V=0 : N$="LC-DEF.DAT" : ST=1
Gosub TLD : If ST=2 Then ST=0 : P$="O" : Goto OPTIONS
TTOP:
ST=0 : R$="" : For NN=1 To 8 : N(NN)=0 : Next : NR=0 : M=0 : D=0 : B$=""
Gosub TITLE : Locate ,7 : Paper 6 : Pen 0
Print " Enter 'O` for options & 'Q` to quit. " : Paper 0 : Pen 2
Wind Open 1,0,75,40,18 : Window 1
Do
Inc NR : G=NR : N1$=" LOTTO " : If MD$="4" Then N1$=" KENO "
If NR>6 and MD$<>"4" Then R$="SUPPLEMENTARY " : G=NR-6
GN$=Str$(G) : If MD$="2" and NR=6 Then GN$="" : R$="POWER-BALL "
NR$=N1$+R$+"NUMBER"+GN$+" IS "
TASK:
NRCH=0 : Print NR$; : Input P$ : Print
N(NR)=Val(P$) : If Upper$(P$)="O" Then P$="O" : Wind Close : Goto OPTIONS
If Upper$(P$)="Q" Then End
If MD$="1" and N(7)=0 and NR=7 Then NR=6 : Exit
If N(NR)<1 or N(NR)>GDMX
Bell 20 : Pen 4 : Print " 1 TO";GDMX;" ONLY MATE !!!" : Pen 2
Print : Goto TASK
End If
If MD$="2" and NR<6 Then Gosub NCHECK
If MD$<>"2" Then Gosub NCHECK
If NRCH=1 Then Bell 20 : Pen 4 : Print " YOU'VE ALREADY GOT THIS NUMBER MATE !!!" : Print : Pen 2 : Goto TASK
If MD$="1" and NR=8 Then Exit
If MD$="2" and NR=6 Then Exit
If MD$="3" and NR=7 Then Exit
If MD$="4" and NR=20 Then Exit
Loop
If MD$="4"
Screen Open 0,640,220,8,Hires : Gosub PAL : Gosub TITLE2
Wind Open 1,0,20,80,18 : Window 1
End If
Gosub NUMS : Curs Off : Pen 7 : Print "ARE YOU SURE THESE NUMBERS ARE CORRECT ? (Y/N/O)" : Pen 2
Do : B$=Upper$(Inkey$) : If B$="N" Then Goto TTOP
If B$="Y" Then Wind Close : Goto TSHOW
If B$="O" Then Show : Goto OPTIONS
If B$="Q" Then End
Loop
NCHECK:
For I=1 To NR : If I<>NR and N(NR)=N(I) Then NRCH=1
Next I : Return
CSCREEN:
LC=200 : LCC=25 : Screen Open 0,320,230,8,LORES
PAL:
Palette $FFF,$FFF,0,,,$C0,,$C0E : Curs Off : Colour Back $FFF
Gosub PALCHECK : Return
Rem **************************** CHECKER **************************
TSHOW: T=0
Do : Inc T
If V=17 Then Locate ,25 : Cline : Pen 4 : Centre "Scaning tickets"
TTSHOW:
SUSS=NX(T) : Gosub SYSUSS
If V<>17
SP=4 : SP$=" " : If MD$="1" or MD$="3" : Gosub MD1SC : End If
If MD$="2" : Gosub MD2SC : End If
Gosub NUMS : Pen 2
Centre X$(T)+SYS$+" ticket"+Str$(T) : Print : Print
If MD$="1" or MD$="3" : Pen 4 : Print Space$(NX(T)*SP+7);"No's "+Pen$(5); : End If
If MD$="2"
Pen 7 : Print Space$(NX(T)*SP+2);"PB";
If NX(T)<23 : Pen 4 : Print " No's"; : End If
End If
If MD$="4" : Pen 5 : Print Space$(48);"Spot"+Pen$(4)+" No's" : End If
If NR=8 or NR=7 : Print "Sup" : End If
If NR=6 : Print : End If : Print
End If
ANAL: WW=0
For L=1 To GT(T) : Pen 6
If V<>17 Then Print " ";Chr$(64+L);" "; : Pen 2
For N=1 To NX(T) : WN(N,L)=0
If MD$="1" or MD$="3" Then Gosub MD1
If MD$="2" Then Gosub MD2
If MD$="4" Then M4=D(T,11,L) : If N<=M4 Then Gosub MD4
If V<>17
If MD$="4"
SP$=" " : If D(T,N,L)=0 : SP$="-" : End If
End If
If D(T,N,L)<10 : Print " "; : End If
If D(T,N,L)>0 : Print SP$;D(T,N,L); : Pen 2 : End If
If D(T,N,L)=0 : Print " ";SP$; : End If
If MD$="2" and N=NX(T)-1 : Pen 7 : Print " "; : End If
If MD$="4" and N=NX(T)-1 : Pen 5 : Print " -"; : End If
End If
Next N
WL(L)=0 : If MD$="1" or MD$="3" Then Gosub MD1CHK
If MD$="2" Then Gosub MD2CHK
If MD$="4" Then Gosub MD4CHK
If V<>17 and WL(L)=1
Pen 3
If NX(T)<23 : Print " "; : Paper 2 : Print " $$ "; : Paper 0 : End If
XXX=X Curs : Locate 1, : Print Chr$(64+L); : Locate XXX,
Else
If V<>17
If NX(T)<23 : Print " "; : End If
End If
End If
If V<>17
If M=0 and MD$<>"2" : Print " "; : End If
If M>0 and NX(T)<23 : Pen 4 : Print M; : End If
If D>0 and MD$<>"2" : Pen 5 : Print " ";D; : End If
Pen 2 : Print
End If : M=0 : D=0
Next L
If WW=1 and V<>17
Locate 4,4 : Paper 3 : Pen 5 : Print " WINNER !!! " : Paper 0 : TTT=T
For W=1 To 10 : Bell 40 : Wait PS : Next W
End If
If Z$="-" and V=17 and WW=0
If T>1 : Dec T : Goto TTSHOW : End If
If T=1 : Z$="" : V=99 : T=TTT : Bell : Locate ,25 : Cline : End If
End If
If V<>17
Locate ,20 : Centre Pen$(7)+"- "+Pen$(2)+"previous "+Pen$(7)+"Space "+Pen$(2)+"next"
Locate ,21 : Centre Pen$(7)+"R "+Pen$(2)+"reset "+Pen$(7)+"F "+Pen$(2)+"first "+Pen$(7)+"L "+Pen$(2)+"last"
Locate ,22 : Centre Pen$(7)+"G "+Pen$(2)+"goto "+Pen$(7)+"P "+Pen$(2)+"print wins "+Pen$(7)+"Q "+Pen$(2)+"quit"
End If
If V=17 or V=99
If T=TT
If WW=0 or V=99
Pen 4 : Locate ,25 : Bell : Centre "All tickets scanned."
End If
If WW=0 : T=TTT : V=99 : End If
End If
End If
Do
If V=17 Then Exit
Z$=Upper$(Inkey$) : If Z$=" " and T<TT Then Exit
If Z$="-" and T>1
If V=99 : V=17 : End If
If V=17 : Locate ,25 : Pen 4 : Cline : Centre "Back scan" : End If
Dec T : Goto TTSHOW
End If
If Z$="F" and T>1
If V=99 : V=17 : End If
Goto TSHOW
End If
If Z$="L" and T<TT Then T=TT : Goto TTSHOW
If Z$="R" or Scancode=69 Then V=0 : SC=1 : Gosub CSCREEN : Goto TTOP
If Z$="P" and WW=1 Then Gosub WPRINT
If Z$="G"
If V=17 : V=99 : End If
Gosub TGOTO : If TTG=0 : Goto TTSHOW : End If
End If
If Z$="Q" Then End
Loop : If V=17 and WW=1 Then V=99 : Goto TTSHOW
If V=99 Then V=17
Loop
NUMS:
Pen 4 : Clw : For NN=1 To NR
If MD$<>"4" and NN>6 Then Pen 5
If MD$="2" and NN=NR Then Pen 5
Print N(NN); : If MD$<>"4" and NN<NR Then Print " -";
Next : Print : Print : Return
MD1:
For NN=1 To NR
If N(NN)=D(T,N,L) and NN<7 Then Pen 4 : Inc M : WN(N,L)=1
If N(NN)=D(T,N,L) and NN>6 Then Pen 5 : Inc D : WN(N,L)=2
Next NN : Return
MD1CHK:
MM=M : If NX(T)<6 Then MM=M+6-NX(T)
If NR=8 or NR=7 Then If MM=3 and D>0 or MM>3 Then WW=1 : WL(L)=1
If NR=6 and MM=6 Then WW=1 : WL(L)=1
Return
MD1SC:
If NX(T)>6 and NX(T)<9 or NX(T)>15 Then SP$="" : SP=3
If NX(T)>8 and SC<>2 Then SC=2 : Screen Open 0,640,220,8,Hires : Gosub PAL
If NX(T)<9 and SC<>1 Then SC=1 : Gosub CSCREEN
Return
MD2:
For NN=1 To NR
If N(NN)=D(T,N,L) and N<>NX(T) and NN<>NR Then Pen 4 : Inc M : WN(N,L)=1
If N(NN)=D(T,N,L) and N=NX(T) and NN=NR Then Pen 5 : Inc D : WN(N,L)=1
Next NN : Return
MD2CHK:
MM=M : If NX(T)<6 Then MM=M+6-NX(T)
If MM=2 and D>0 or MM>2 Then WW=1 : WL(L)=1
Return
MD2SC:
If NX(T)>6 and NX(T)<10 or NX(T)>16 Then SP$="" : SP=3
If NX(T)>9 and SC<>2 Then SC=2 : Screen Open 0,640,220,8,Hires : Gosub PAL
If NX(T)<10 and SC<>1 Then SC=1 : Gosub CSCREEN
Return
MD4:
For NN=1 To NR
If N(NN)=D(T,N,L) Then Pen 4 : Inc M : WN(N,L)=1
Next NN : Return
MD4CHK:
If M4=10 Then If M=0 or M>6 Then WW=1 : WL(L)=1
If M4=9 or M4=8 Then If M>5 Then WW=1 : WL(L)=1
If M4=7 or M4=6 Then If M>4 Then WW=1 : WL(L)=1
If M4=5 and M>3 Then WW=1 : WL(L)=1
If M4=4 and M>2 Then WW=1 : WL(L)=1
If M4=3 and M>1 Then WW=1 : WL(L)=1
Return
SYSUSS:
SYS$=" standard" : SY=0 : If MD$="2" Then SY=1
SY$=Str$(SUSS-SY) : If MD$<>"2" and SUSS<6 Then SYS$=" take"+SY$
If MD$<>"2" and SUSS>6 Then SYS$=" system"+SY$
If MD$="2" and SUSS<>6 Then SYS$=" PowerPlay"+SY$
If MD$="4" Then SYS$=" keno"
Return
TITLE:
Unpack 7 To 0 : Gosub PALCHECK : Flash 3,"(FF0,10)(FFF,7)(000,7)" : Return
Rem Use pica 60 font for text.
Rem ********************************* WIN PRINT *****************************
WPRINT:
Locate ,25 : Gosub PRCHECK : If PR<>252 Then Return
Open Out 1,PR$
Print #1,X$(T);SYS$;" ticket";T;LF$;
SPP$=" " : If NX(T)=20 Then SPP$=""
For L=1 To GT(T)
If WL(L)=1
Print #1," ";Chr$(64+L);" ";
For N=1 To NX(T)
If WN(N,L)=0 : WP$=" --" : End If
If MD$="4" and N>D(T,11,L) : WP$=" " : End If
If WN(N,L)>0
If D(T,N,L)<10 : WP$=" "+Str$(D(T,N,L)) : End If
If D(T,N,L)>9 : WP$=Str$(D(T,N,L)) : End If
End If
Print #1,WP$;SPP$;
If MD$="2" and N=NX(T)-1 : Print #1," PB"; : End If
If MD$="4" and N=NX(T)-1 : Print #1," Spot";D(T,11,L); : End If
Next N : Print #1,LF$;" ";
For N=1 To NX(T)
If WN(N,L)=2 : Print #1," ~~";SPP$;
Else Print #1," ";SPP$;
End If
Next N : Print #1,LF$;
End If
Next L : Print #1,LF$; : Close 1 : Cline : Bell : Return
Rem **************************** OPTIONS ************************************
OPTIONS:
Gosub TITLE : Curs Off : Pen 6 : Inverse On : Locate ,7
Print " OPTIONS MENU " : Print : Inverse Off
Locate 7,10 : Pen 4 : Print "L "; : Pen 2 : Print "Load a new data file"
Locate 7,12 : Pen 4 : Print "E "; : Pen 2 : Print "Ticket editor"
Locate 7,14 : Pen 4 : Print "R "; : Pen 2 : Print "Create random tickets"
Locate 7,16 : Pen 4 : Print "C "; : Pen 2 : Print "Return to checker"
Locate 7,18 : Pen 4 : Print "W "; : Pen 2 : Print "Show winning tickets only"
Locate 7,21 : Pen 7 : Print "A "; : Pen 2 : Print "About";
Pen 7 : Print " Q "; : Pen 2 : Print "Quit"
Do : V$=Inkey$ : V=Scancode
If V=18 Then Goto TSCREEN
If V=40 Then Gosub TL1 : Cline : If N$<>"" Then Goto SUSS
If Upper$(V$)="R" Then Goto TRANDOM : Rem V=19
If V=51 or V=69 or V=17 Then Goto SUSS
If V=16 Then End
If V=32 Then Goto ABOUT
Loop
SUSS:
If N$="" and V=40 Then Goto OPTIONS
ER$="check..!!"
If TT=0
Bell 20 : Cls : Locate ,14 : Pen 4 : Centre "Nothing to "+ER$
Wait 150 : Goto OPTIONS
End If
If P$="O" Then P$="" : Goto TTOP
If B$="O" Then B$="" : Goto TSHOW
Rem ****************************** RANDOM **********************************
TRANDOM:
If MD$="" Then MD$="1" : Gosub TLIMITS
Wind Open 1,0,208,30,1 : Window 1
Pen 7 : Input " How many tickets ? ";GG : Wind Close : Locate ,25 : Pen 4
If GG>TMX Then Bell 20 : Centre "No more than"+Str$(TMX) : Goto TRANDOM
If GG<1 Then Goto OPTIONS
Cline : Centre "Creating tickets." : Gosub TEDIT : TT=GG
For T=1 To TT : GT(T)=GPT : NX(T)=6 : Gosub TTRND : Next T
Bell : Goto TSCREEN
TTRND:
X$(T)="RANDOM" : For L=1 To GT(T) : Gosub RGAME : Next L : Return
RGAME:
RMX=NX(T) : If MD$="4" Then RMX=D(T,11,L) : If RMX<3 Then RMX=3 : D(T,11,L)=3
For R=1 To RMX
TRND:
RDCH=0 : Randomize Timer : R(R)=Rnd(GDMX-1)+1
If MD$="2" and R<>NX(T) Then Gosub RDCHECK
If MD$<>"2" Then Gosub RDCHECK
If RDCH=1 Then Goto TRND
Next R : Gosub RSORT : Return
RDCHECK:
For S=1 To R : If S<>R and R(R)=R(S) Then RDCH=1
Next S : Return
Rem ****************************** EDITOR **********************************
TEDIT:
For T=1 To TT : TZ=T : Gosub TZERO : GT(T)=0 : NX(T)=0 : Next T
If Z1=40 or V=40 Then Return
N=1 : L=1 : TT=0 : If V=19 Then Return
TSCREEN:
If MD$="" Then MD$="1"
Screen Open 0,640,220,8,Hires : Palette $FFF,$FFF,0,,,$E0,,$C0E
Gosub PALCHECK : Colour Back $FFF : Flash 3,"(f00,15)(fff,10)" : Curs Off
If V=32 Then Goto TITLE2
Z4=0 : T=1 : LC=8 : LCC=1 : Gosub LAYOUT : Gosub TICKET
MAIN:
A$=Upper$(Inkey$) : Z=Asc(A$) : Z1=Scancode : Z2=Key Shift
V=0 : Z3=0 : If Z2=16 or Z2=32 or Z2=20 or Z2=36 Then Z3=1
If Z2=8 or Z2=12 Then Z3=2
If A$="_" Then A$="-"
If A$="=" Then A$="+"
If Z3=1 and Z4=2 and MD$<>"2" Then Gosub BLANK : Gosub ALT
If Z3=2 and Z4=1 and MD$<>"2" Then Gosub BLANK : Gosub CTRL
If Z1>75 and Z1<80 : Gosub DCHECK : Rem *** AN ARROW ***
If DCH=0
C$="-"
If MD$="2" or MD$="4"
If N=NX(T) : C$="=" : End If
End If
C=6 : Gosub POSY
If Z1=77 : Inc L : End If : If L>GT(T) : L=1 : End If : Rem ** V **
If Z1=76 : Dec L : End If : If L<1 : L=GT(T) : End If : Rem ** ^ **
If Z1=78 : Inc N : End If : If N>NX(T) : N=1 : End If : Rem ** > **
If MD$="4" and N>D(T,11,L) : N=11 : End If
If Z1=79 : Rem ** < **
If MD$="4" and N=11
N=D(T,11,L)
Else
Dec N
End If
End If
If N<1 : N=NX(T) : End If
End If
End If
If Z>47 and Z<58 : Y=0 : Rem *** A NUMBER ***
If D(T,N,L)>0
X=-2 : C$=Str$(D(T,N,L))+A$
NVL=GDMX+1 : If MD$="4" and N=11 : NVL=11 : End If
If Val(C$)<NVL : Gosub NUM : D(T,N,L)=Val(C$) : End If
End If
If D(T,N,L)=0 : D(T,N,L)=Val(A$) : C$=A$
If D(T,N,L)>0 : Gosub NUM : End If
End If
End If
If Z1=70 or Z1=65 : Rem *** DELETE ***
Y=0 : C=2 : If D(T,N,L)<10 : C$=" " : Gosub NUM : D(T,N,L)=0 : End If
If D(T,N,L)>9 : C$=" "+Left$(Str$(D(T,N,L)),2) : X=-2
Gosub NUM : D(T,N,L)=Val(C$)
End If
End If
If A$="+" and T<TMX : Gosub DCHECK : Gosub CHECK
If DCH=0 and CH>0 : D$=X$(T) : Inc T
If X$(T)="" and T>TT : X$(T)=D$ : End If : Gosub LAYOUT : Gosub TICKET
End If
End If
If TT<T Then TT=T
If A$="-" and T>1 Then Gosub DCHECK : If DCH=0 Then Dec T : Gosub LAYOUT : Gosub TICKET
If A$="Q"
Locate ,1 : Centre Pen$(4)+"Are you sure you want to quit? (Y/N)"
Gosub CONFIRM : If E$="Y" : End : End If
End If
If Z=13 Then Goto NAME
If Z3=1 and Z1=33 Then Goto TSAVE
If Z3=1 and Z1=40 Then Goto TLOAD
If Z3=1 and Z1=50 Then TZ=0 : Gosub TZERO : TA=0 : TB=T : Gosub TCOPY : Bell
If Z3=1 and Z1=53
TZ=T : Gosub TZERO : TA=T : TB=0 : Gosub TCOPY
Gosub LAYOUT : Gosub TICKET
End If
If Z3=1 and Z1=17
TZ=TMX+1 : Gosub TZERO : TA=TZ : TB=0 : Gosub TCOPY
TZ=0 : Gosub TZERO : TA=0 : TB=T : Gosub TCOPY
TZ=T : Gosub TZERO : TA=T : TB=TMX+1 : Gosub TCOPY
Gosub LAYOUT : Gosub TICKET
End If
If Z3=1 and Z1=54
Gosub CHECK : Locate ,1
If TT=1 and CH>0 or TT>1
Centre Pen$(4)+"All existing data will be lost. Continue ? (Y/N)"
Gosub CONFIRM : If E$="N" : Goto MAIN : End If
End If : NC=0 : Goto TEDIT
End If
If Z3=1 and Z1=19
Locate ,1 : Pen 4 : Centre "Creating random ticket."
Gosub TTRND : Gosub LAYOUT : Gosub TICKET
End If
If A$="F" and T>1 Then T=1 : Gosub LAYOUT : Gosub TICKET
If A$="L" and T<TT
TTT=T : T=TT : Gosub CHECK
If CH=0 : Dec T : End If
If TTT<>T : Gosub LAYOUT : Gosub TICKET : End If
End If
If A$="G" and Z3=0 Then Goto TGOTO
If Z3=1 and Z1=25 Then Gosub CHECK : If CH>0 Then Goto TPRT
If Z3=1 and Z1=49 Then TZ=T : Gosub TZERO : Gosub LAYOUT
If Z3=1 and Z1=39 Then Goto TERASE
If Z3=1 and Z1=23 Then Goto TINSERT
If Z3=1 and Z1=32 Then Goto TPRINT
If A$="S" and Z3=0 Then Goto TSORT
If Z3=2 and Z1=24 or Z1=69 : Gosub DCHECK
If DCH=0 : T=TT : Gosub CHECK
If CH=0 : Dec TT : End If : Gosub CSCREEN : Goto OPTIONS
End If
End If
If Z3=2 and Z1=55
Gosub CHECK : Locate ,1
If TT=1 and CH>0 or TT>1
Centre Pen$(4)+"Changing mode will clear all data. Continue ? (Y/N)"
Gosub CONFIRM : If E$="N" : Goto MAIN : End If
End If : NC=0 : Locate ,1
Centre Pen$(6)+"Select mode. ("+Pen$(4)+"P"+Pen$(6)+"ools/"+Pen$(4)+"L"+Pen$(6)+"otto/Power"+Pen$(4)+"B"+Pen$(6)+"all/"+Pen$(4)+"K"+Pen$(6)+"eno)"
Do : E$=Upper$(Inkey$)
If E$="P" or E$="L" or E$="B" or E$="K" : Cline : Exit : End If
Loop
If E$="L" : MD$="1" : End If
If E$="B" : MD$="2" : End If
If E$="P" : MD$="3" : End If
If E$="K" : MD$="4" : End If
Goto TEDIT
End If
If Z3=2 and Z1=19 Then Y=0 : C=2 : NN=N : Gosub RGAME : Gosub LIN : N=NN
If Z3=2 and Z1=36 Then Goto GMTT
If Z3=2 and Z1=33 and MD$<>"4" Then Goto TSYSTEM
If Z3=2 and Z1=49
TZ=T : LL=L : Gosub GZERO : NN=N : Y=0 : C=2 : Gosub LIN : N=NN
End If
If Z3=2 and Z1=25
GCH=0 : For NN=1 To NX(T) : If D(T,NN,L)>0 : GCH=1 : End If : Next NN
If GCH=1 : Goto TPRT : End If
End If
If Z3=2 and Z1=50
TZ=0 : LL=0 : Gosub GZERO : LB=L : TA=0 : TB=T : NC=NX(T)
Gosub GCOPY : Bell
End If
If Z3=2 and Z1=53
TZ=T : LL=L : Gosub GZERO : TA=T : TB=0 : LB=0 : NC=NX(T)
Gosub GCOPY : NN=N : Y=0 : C=2 : Gosub LIN : N=NN
End If
If Z3=2 and Z1=17
NC=NX(T) : TA=T : LL=0 : TB=T : LB=L : Gosub GCOPY : TZ=T : LL=L
Gosub GZERO : TB=0 : LB=0 : Gosub GCOPY : TZ=0 : LL=0 : Gosub GZERO
TB=T : TA=0 : Gosub GCOPY : TZ=T : Gosub GZERO
NN=N : Y=0 : C=2 : Gosub LIN : N=NN
End If
If Z3=2 and Z1=39 Then Goto GERASE
If Z3=2 and Z1=23 and GT(T)<GPT Then Goto GINSERT
Rem *************************
If MD$="4" and D(T,11,L)<3 Then N=11
C=3 : C$="^" : X=0 : Y=1 : Gosub POSY : Goto MAIN
NUM:
C=2 : If MD$="2" and N=NX(T) Then C=4
If MD$="4" and N=NX(T) Then C=5
POSY:
Locate X+(N*3),Y+(L*2) : Pen C : Print C$ : Return
TLIMITS:
If NX(T)=0 Then NX(T)=6
If MD$="1" or MD$="2" Then GDMX=45
If MD$="3" Then GDMX=38
If MD$="4" Then GDMX=80 : NX(T)=11 : GPT=5
If MD$="1" or MD$="3" Then GPT=12
If MD$="2" Then GPT=6
If GT(T)=0 Then GT(T)=GPT
Return
LAYOUT:
Gosub TLIMITS : Cls : Pen 7 : Inverse On
Print " LOTTO TICKET EDITOR Version 2.0 (C) 1997 Lorence Lombardo " : Inverse Off
Print : For K=1 To GT(T) : Pen 5 : Print Chr$(64+K)
Pen 6 : Print " "; : For KK=1 To NX(T) : QQ$=" --"
If MD$="2" or MD$="4" Then If KK=NX(T) Then QQ$=" =="
Print QQ$; : Next KK
Print : Next K : Pen 2
If MD$="1" or MD$="3" or MD$="4" Then Gosub TLAYOUT
If MD$="2" Then Gosub PBLAYOUT
Return
TLAYOUT:
If MD$="1" Then MDN$="Lotto"
If MD$="3" Then MDN$="Pools"
If MD$="4" Then MDN$="Keno"
Locate 62,2 : Print MDN$;" ticket";T : Pen 4 : Locate 63,3 : Print "NAME: "; : Pen 6 : Print X$(T)
Locate 63,4 : Pen 4 : Print "TYPE:"; : Pen 6 : SUSS=NX(T) : Gosub SYSUSS : Print SYS$
Locate 63,5 : Pen 4 : Print "GAMES:"; : Pen 6 : Print GT(T)
Locate 62,6 : Pen 5 : Paper 2 : Print " KEY COMMANDS " : Paper 0
Locate 62,7 : Pen 5 : Print "+ "; : Pen 2 : Print "next "; : Pen 5 : Print "- "; : Pen 2 : Print "previous" : Pen 5
Locate 62,8 : Pen 5 : Print "F "; : Pen 2 : Print "first "; : Pen 5 : Print "L "; : Pen 2 : Print "last"; : Pen 5
Locate 62,9 : Print "G "; : Pen 2 : Print "goto"; : Pen 5 : Print " Del "; : Pen 2 : Print "del # "; : Pen 5
Locate 62,10 : Print "S"; : Pen 2 : Print " sort "; : Pen 5 : Print "Enter "; : Pen 2 : Print "name ";
Locate 62,11 : Pen 5 : Print "Arws "; : Pen 2 : Print "curs "; : Pen 5 : Print "Q "; : Pen 2 : Print "quit"
If Z4<2 Then Gosub ALT Else Gosub CTRL
Return
ALT:
Locate 62,13 : Pen 4 : Print "[ALT] KEYS:- " : Pen 5 : Z4=1
Locate 62,14 : Print "L "; : Pen 2 : Print "load "; : Pen 5 : Print "S "; : Pen 2 : Print "save" : Pen 5
Locate 62,15 : Print "N "; : Pen 2 : Print "new "; : Pen 5 : Print "A "; : Pen 2 : Print "print all"
Locate 62,16 : Pen 7 : Print "Ticket:-" : B2$="[Ctrl]" : Gosub FUNS : Return
CTRL:
Locate 62,13 : Pen 4 : Print "[CTRL] KEYS:-" : Pen 5 : Z4=2
Locate 62,14 : If MD$<>"4" Then Print "S "; : Pen 2 : Print "system ";
Pen 5 : Print "G "; : Pen 2 : Print "games" : Pen 5
Locate 62,15 : Print "O "; : Pen 2 : Print "options "; : Pen 5 : Print "M "; : Pen 2 : Print "mode"
Locate 62,16 : Pen 7 : Print "Game:-" : B2$="[Alt]" : Gosub FUNS : Return
FUNS:
Locate 62,17 : Pen 5 : Print "X "; : Pen 2 : Print "copy "; : Pen 5 : Print "B "; : Pen 2 : Print "paste" : Pen 5
Locate 62,18 : Print "W "; : Pen 2 : Print "swap "; : Pen 5 : Print "P "; : Pen 2 : Print "print" : Pen 5
Locate 62,19 : Print "Z "; : Pen 2 : Print "zero "; : Pen 5 : Print "R "; : Pen 2 : Print "random" : Pen 5
Locate 62,20 : Print "K "; : Pen 2 : Print "kill "; : Pen 5 : Print "I "; : Pen 2 : Print "insert"
Locate 62,22 : Pen 6 : Print "Press "; : Pen 4 : Print B2$; : Pen 6 : Print " for "
Locate 62,23 : Print " more fuctions." : Return
BLANK:
For B1=1 To 4 : Locate 62,12+B1 : Print Space$(18) : Next B1 : Return
PBLAYOUT:
Locate 31,15 : Pen 6 : Inverse On : Print " PowerBall mode " : Inverse Off
PBX=11 : Locate 35,17 : Pen 2 : Print "Ticket";T
Locate PBX,17 : Pen 4 : Print "NAME: "; : Pen 6 : Print X$(T)
Locate PBX,18 : Pen 4 : Print "TYPE:"; : Pen 6 : SUSS=NX(T) : Gosub SYSUSS : Print SYS$
Locate PBX,19 : Pen 4 : Print "GAMES:"; : Pen 6 : Print GT(T)
Locate PBX,20 : Pen 5 : Paper 2 : Print " KEY COMMANDS " : Paper 0
Locate PBX,21 : Pen 5 : Print "+ "; : Pen 2 : Print "next "; : Pen 5 : Print "- "; : Pen 2 : Print "previous" : Pen 5
Locate PBX,22 : Pen 5 : Print "F "; : Pen 2 : Print "first "; : Pen 5 : Print "L "; : Pen 2 : Print "last"; : Pen 5
Locate PBX,23 : Print "G "; : Pen 2 : Print "goto"; : Pen 5 : Print " Del "; : Pen 2 : Print "del # "; : Pen 5
Locate PBX,24 : Print "S"; : Pen 2 : Print " sort "; : Pen 5 : Print "Enter "; : Pen 2 : Print "name ";
Locate PBX,25 : Pen 5 : Print "Arws "; : Pen 2 : Print "curs "; : Pen 5 : Print "Q "; : Pen 2 : Print "quit"
Locate PBX+20,18 : Pen 4 : Print "[ALT] KEYS:- "
Locate PBX+20,19 : Pen 5 : Print "L "; : Pen 2 : Print "load "; : Pen 5 : Print "S "; : Pen 2 : Print "save"
Locate PBX+20,20 : Pen 5 : Print "N "; : Pen 2 : Print "new "; : Pen 5 : Print "A "; : Pen 2 : Print "print all"
Locate PBX+20,21 : Pen 7 : Print "Ticket:-"
Locate PBX+20,22 : Pen 5 : Print "X "; : Pen 2 : Print "copy "; : Pen 5 : Print "B "; : Pen 2 : Print "paste" : Pen 5
Locate PBX+20,23 : Print "W "; : Pen 2 : Print "swap "; : Pen 5 : Print "P "; : Pen 2 : Print "print" : Pen 5
Locate PBX+20,24 : Print "Z "; : Pen 2 : Print "zero "; : Pen 5 : Print "R "; : Pen 2 : Print "random" : Pen 5
Locate PBX+20,25 : Print "K "; : Pen 2 : Print "kill "; : Pen 5 : Print "I "; : Pen 2 : Print "insert"
Locate PBX+40,18 : Pen 4 : Print "[CTRL] KEYS:-" : Pen 5 : Z4=2
Locate PBX+40,19 : Print "S "; : Pen 2 : Print "system"; : Pen 5 : Print " G "; : Pen 2 : Print "games" : Pen 5
Locate PBX+40,20 : Print "O "; : Pen 2 : Print "options "; : Pen 5 : Print "M "; : Pen 2 : Print "mode"
Locate PBX+40,21 : Pen 7 : Print "Game:-"
Locate PBX+40,22 : Pen 5 : Print "X "; : Pen 2 : Print "copy "; : Pen 5 : Print "B "; : Pen 2 : Print "paste" : Pen 5
Locate PBX+40,23 : Print "W "; : Pen 2 : Print "swap "; : Pen 5 : Print "P "; : Pen 2 : Print "print" : Pen 5
Locate PBX+40,24 : Print "Z "; : Pen 2 : Print "zero "; : Pen 5 : Print "R "; : Pen 2 : Print "random" : Pen 5
Locate PBX+40,25 : Print "K "; : Pen 2 : Print "kill "; : Pen 5 : Print "I "; : Pen 2 : Print "insert"
Return
DCHECK:
Locate ,1 : Cline : DCH=0 : Pen 4
If MD$="4" and N=NX(T)
M4=D(T,11,L) : If M4=0 and A$="-" : Return : End If
If M4<3 : DCH=1 : Bell 20 : Centre "Invalid spot number." : End If
If M4>2 and M4<10
For NN=M4+1 To 10 : D(T,NN,L)=0 : Next
NN=N : Y=0 : Gosub LIN : N=NN : Y=1 : X=0
End If
Return
Else
If D(T,N,L)=0 : Return : End If
End If
If MD$="2" and N=NX(T) Then Return
NXT=NX(T) : If MD$="2" or MD$="4" Then NXT=NX(T)-1
For NCH=1 To NXT : If N<>NCH and D(T,N,L)=D(T,NCH,L) Then DCH=1
Next NCH : If DCH=1 Then Bell 20 : Centre "Duplicate number."
Return
TICKET:
Y=0 : For L=1 To GT(T) : Gosub LIN : Next L : N=1 : L=1 : Return
LIN:
For N=1 To NX(T) : X=-1 : If D(T,N,L)>9 Then X=-2
C$=Str$(D(T,N,L)) : If D(T,N,L)=0 Then C$=" "
Gosub NUM
Next N : Return
CHECK:
CH=0 : NN=N : LL=L : For L=1 To GT(T)
For N=1 To NX(T) : If D(T,N,L)>CH Then CH=D(T,N,L)
Next N : Next L : N=NN : L=LL : Return
NAME:
Wind Open 1,0,8,30,1 : Window 1
Pen 7 : Input " Enter name ? ";X$(T) : Wind Close
If Len(X$(T))>10 Then Bell 20 : Locate ,1 : Centre Pen$(4)+"No more than 10 characters long." : Wait 150 : Cline : Goto NAME
Gosub LAYOUT : Gosub TICKET : Goto MAIN
GMTT:
Wind Open 1,0,8,30,1 : Window 1
Pen 7 : Input " Enter number of games ? ";GGG : Wind Close
GPT$=Pen$(4)+"No more than"+Str$(GPT)+" games per ticket."
If GGG<1 Then Goto MAIN
If GGG>GPT Then Bell 20 : Locate ,1 : Centre GPT$ : Wait 150 : Cline : Goto GMTT
TZ=T : Gosub TZERO : L=1 : N=1 : GT(T)=GGG : Gosub LAYOUT : Goto MAIN
TSYSTEM:
Wind Open 1,0,8,30,1 : Window 1
Pen 7 : Input " Enter ticket system ? ";NXX : Wind Close
If MD$="1" or MD$="3" Then NXMN=4 : NXMX=20
If MD$="2" Then NXMN=3 : NXMX=24
NX$=Pen$(4)+"Systems are no less than"+Str$(NXMN)+" and no more than "+Str$(NXMX)
If NXX<1 Then Goto MAIN
If NXX<NXMN or NXX>NXMX Then Bell 20 : Locate ,1 : Centre NX$ : Wait 150 : Cline : Goto TSYSTEM
TZ=T : Gosub TZERO : L=1 : N=1
If MD$="2" Then Inc NXX
NX(T)=NXX : Gosub LAYOUT : Goto MAIN
TSAVE:
TTT=T : T=TT : Gosub CHECK : T=TTT : TS=TT : If CH=0 Then Dec TS
LLL=L : NNN=N : Gosub DCHECK : If DCH=1 or TS=0 Then Goto MAIN
TSV:
FL$="Enter name of data file to save." : Gosub FREQ
If N$=""
If Z1=40 : Goto TL1 : End If : Goto MAIN
End If
Locate ,1 : Cline : Pen 4
If Exist(N$)=-1
Centre "File already exists. Shall I overwrite ? (Y/N)"
Gosub CONFIRM : If E$="N" : Goto TSV : End If
End If
Centre "SAVING" : Open Out 1,N$ : Print #1,FCH2$ : Print #1,MD$;",";Mid$(Str$(TS),2)
For T=1 To TS : Print #1,X$(T);",";Mid$(Str$(GT(T)),2);",";Mid$(Str$(NX(T)),2)
For L=1 To GT(T) : For N=1 To NX(T) : Print #1,Mid$(Str$(D(T,N,L)),2)
Next N : Next L : Next T : Close 1 : T=TTT : L=LLL : N=NNN : Cline : Bell
If Z1=40 : Goto TL1 : End If : Goto MAIN
TLOAD:
If TT=1 Then Gosub CHECK : If CH=0 Then Goto TL1
Locate ,1 : Centre Pen$(4)+"Shall I save existing data before loading ? (Y/N)"
Gosub CONFIRM : If E$="Y" Then Goto TSAVE
TL1:
FL$="Enter name of data file to load." : Gosub FREQ
If N$=""
If Z1=40 : Goto MAIN : End If : Return
End If
TLD:
If Exist(N$)=0
Bell 20 : Locate ,LCC : Pen 4 : Centre "Data file does not exist."
Wait 150 : If ST=1 : ST=2 : Return : End If : Cline : Goto TL1
End If : Locate ,LCC : Pen 4 : Centre "Loading data file."
STLD:
DFC$="" : Open In 1,N$ : Set Input 13,10 : Input #1,DFC$
If DFC$<>FCH$ and DFC$<>FCH2$
Bell 20 : If Z1=40 : Pen 3 : End If
Centre "Not a Lotto Check data file....!!" : Wait 150
Cline : Close 1 : If ST=1 : ST=2 : Return : End If : Goto TL1
End If : If Z1=40 or V=40 Then Gosub TEDIT
If DFC$=FCH$ Then MD$="1" Else Input #1,MD$
Gosub TLIMITS
Input #1,TT : For T=1 To TT : Input #1,X$(T),GT(T),NX(T)
For L=1 To GT(T) : For N=1 To NX(T) : Input #1,D(T,N,L)
Next N : Next L : Next T : Close 1 : Bell : If Z1<>40 Then Return
T=1 : Gosub LAYOUT : Gosub TICKET : Goto MAIN
FREQ:
Show : N$=Fsel$(Dir$,"LC-DEF.DAT",FL$) : Hide : Return
TGOTO:
TTG=0 : If Z$<>"G" Then Gosub DCHECK : If DCH=1 Then Goto MAIN
Locate ,LCC : Cline : Wind Open 1,0,LC,30,1 : Window 1
Pen 7 : Input " Goto ticket number ? ";TTT : Wind Close
If TTT<1
If Z$="G" : TTG=1 : Return : End If : Goto MAIN
End If
If TTT>TT Then Bell 20 : Centre Pen$(4)+"Ticket does not exist." : Wait 150 : Goto TGOTO
T=TTT : If Z$="G" Then Return
Gosub LAYOUT : Gosub TICKET : Goto MAIN
TSORT:
LL=L : NN=N : Gosub DCHECK : If DCH=1 Then Goto MAIN
TTT=T : T=TT : Gosub CHECK : TT2=TT : If CH=0 Then TT2=TT-1
Locate ,1 : Pen 7 : Centre "Sorting all tickets."
For T=1 To TT2
For L=1 To GT(T)
For N=1 To NX(T) : R(N)=D(T,N,L) : Next N
Gosub RSORT
Next L
Next T : T=TTT : Cline : Gosub TICKET : L=LL : N=NN : Bell : Goto MAIN
RSORT:
NXT=NX(T) : If MD$="4" Then NXT=D(T,11,L)
If MD$="2" Then NXT=NX(T)-1 : D(T,NX(T),L)=R(NX(T)) : R(NX(T))=0
For N=1 To NXT : NX=NXT-N+1 : D(T,NX,L)=0 : For S=1 To NXT
If R(S)>D(T,NX,L) Then D(T,NX,L)=R(S) : CL=S
Next S : R(CL)=0 : Next N : Return
GINSERT:
LLL=L : NNN=N : TA=T : TB=T : TZ=T : NC=NX(T) : Inc GT(T) : GL=GT(T)-L-1
For GE=0 To GL : LL=GT(T)-GE : LB=LL-1 : Gosub GCOPY : Next GE : LL=LLL
Gosub GZERO : Gosub LAYOUT : Gosub TICKET : L=LLL : N=NNN : Goto MAIN
TINSERT:
Gosub DCHECK : Gosub CHECK : If CH=0 or DCH=1 Then Goto MAIN
TTT=T : T=TT : Gosub CHECK : T=TTT : If TT=TMX and CH>0 Then Goto MAIN
Locate ,1 : Centre Pen$(4)+"Inserting ticket." : If CH>0 Then Inc TT
TL=TT-T-1 : For TI=0 To TL : TA=TT-TI : TB=TA-1 : Gosub TCOPY : Next TI
TZ=T : Gosub TZERO : L=1 : N=1 : Gosub LAYOUT : Bell : Goto MAIN
TCOPY:
X$(TA)=X$(TB) : GT(TA)=GT(TB) : NX(TA)=NX(TB) : NC=NX(TA)
For LL=1 To GT(TA) : LB=LL : Gosub GCOPY : Next LL : Return
GCOPY:
For NN=1 To NC : D(TA,NN,LL)=D(TB,NN,LB) : Next NN : Return
TZERO:
X$(TZ)="" : For LL=1 To GT(TZ) : Gosub GZERO : Next LL : Return
GZERO:
NZ=NX(TZ) : If TZ=0 and LL=0 Then NZ=25
For NN=1 To NZ : D(TZ,NN,LL)=0 : Next NN : Return
TERASE:
Gosub CHECK : If T=TT and CH=0 Then Goto MAIN
Locate ,1 : Centre Pen$(4)+"Erasing ticket."
If T<TT
TL=TT-T-1 : For TE=0 To TL : TA=T+TE : TB=TA+1 : Gosub TCOPY : Next TE
End If
TZ=TT : Gosub TZERO : Dec TT : Gosub LAYOUT : Gosub TICKET : Bell : Goto MAIN
GERASE:
If GT(T)<2 Then Goto TERASE
LLL=L : NNN=N : TA=T : TB=T : TZ=T : NC=NX(T)
If L<GT(T)
GL=GT(T)-L-1 : For GE=0 To GL : LL=L+GE : LB=LL+1 : Gosub GCOPY : Next GE
End If
LL=GT(T) : Gosub GZERO : Dec GT(T) : Gosub LAYOUT : Gosub TICKET
L=LLL : If L>GT(T) Then L=GT(T)
N=NNN : Goto MAIN
TPRINT:
TTT=T : T=TT : Gosub CHECK : If CH=0 Then Dec TT
If TT=0 Then Goto MAIN
TPRT:
LLL=L : NNN=N : Locate ,1
Gosub PRCHECK : If PR<>252 Then L=LLL : N=NNN : Goto MAIN
Open Out 1,PR$ : If Z3=1 and Z1=25 Then Gosub TPR : Goto PREND
If GCH=1 Then Print #1,LF$; : Gosub GPR : GCH=0 : Goto PREND
For T=1 To TT : Gosub TPR : Next T : T=TTT
PREND:
Close 1 : L=LLL : N=NNN : Cline : Bell : Goto MAIN
TPR:
SUSS=NX(T) : Gosub SYSUSS
Print #1,X$(T);SYS$;" ticket";T;LF$;LF$; : SP$=" " : If NX(T)>18 Then SP$=""
For L=1 To GT(T) : Gosub GPR : Next L : Print #1,LF$;LF$; : Return
GPR:
Print #1,Chr$(64+L);" ";
For N=1 To NX(T)
PP$=Str$(D(T,N,L)) : If D(T,N,L)=0 Then PP$=" "
SS$="" : If D(T,N,L)>0 and D(T,N,L)<10 Then SS$=" "
Print #1,SS$;PP$;SP$;
If MD$="4" and N=NX(T)-1 Then Print #1," Spot";
If MD$="2" and N=NX(T)-1 Then Print #1," PB";
Next N : Print #1,LF$; : Return
PRCHECK:
PR=Peek($BFD000) : Pen 4
If PR=252
Centre "Sending data to printer."
Else
Bell 20 : Centre "Printer not active...!!" : Wait 150 : Cline
End If : Return
PALCHECK:
If Ntsc=-1
Screen Display 0,,40,, : PS=7
Else
Screen Display 0,,62,, : PS=6
End If : Return
CONFIRM:
Bell BEEP : Do : E$=Upper$(Inkey$) : If E$="Y" or Asc(E$)=78 Then Cline : Return
Loop
TERROR:
If Errn=100 or Errn=34 Then Resume Next
Bell 20 : Pen 3 : Locate ,1 : Cline
If Errn=84 Then Centre "DISK IS WRITE PROTECTED" : Resume TSV
If Errn=88 Then Centre "DISK IS FULL" : Resume TSV
If Errn=93
If Z1=33 : Resume TSV : End If : Resume TLOAD
End If
Cls : Locate ,13 : Centre Pen$(4)+"Error No."+Str$(Errn)+" not defined."
Locate ,24 : Centre Pen$(7)+"Press Enter to quit." : PP$=Chr$(13) : Gosub PAUSE : End
PAUSE:
Do : If Inkey$=PP$ : Exit : End If : Loop : Return
TITLE2:
Cls : Pen 7 : Inverse On
Print " LOTTO CHECK Version 2.0 (C) 1997 Lorence Lombardo "
Inverse Off : Pen 2 : Print : Return
ABOUT:
Gosub TSCREEN
Print " This version of Lotto Check both for the Amiga and IBM, was written on an"
Print " Amiga 1200 equiped with a Blizzard 68060 board. The IBM version was ported"
Print " from the Amiga version using `PCx' the best & fastest IBM emulator I have"
Print " have ever seen for the Amiga, which was written by Jim Drew & MicroCode"
Print " Solutions. Thanks Jim & MicroCode. Looking forward to future versions of"
Print " this excellent program. Thanks to"; : Pen 5 : Print " Richard Gormley"+Pen$(2)+" for scrutinizing,"
Print " bug testing and program suggestions. Thanks to "+Pen$(5)+"Warren Rizzi"+Pen$(2)+" for the icon"
Print " on the Amiga version." : Pen 3 : Print
Print " This program is `ShareWare'" : Print : Pen 2
Print " If you try this program and wish to continue to use it, you may do so"
Print " provided you do following as payment:-" : Print
Print " * Send a disk with some PD on it, preferably AMIGA PD but IBM PD will"
Print " be accepted."
Print " * Let me know whether you are using the AMIGA or IBM version, the version"
Print " number, tell what you think of it and if you have found bugs let me"
Print " know what they are." : Pen 7
Print " Payment should be sent to:"+Pen$(6)+" LORRY"
Print " 5 Rankin street"
Print " Altona, Victoria,"
Print " Australia, 3018." : Pen 5
Centre "Press space to continue" : PP$=" " : Gosub PAUSE : Gosub TSCREEN
Print " I dont think that I am asking for too much. If you dont comply to the"
Print " ShareWare requirements then you are a very naughty immoral person and I"
Print " hope your hard disk is wiped by a virus or your computer mysteriously"
Print " self combusts." : Print : Print : Pen 6
Print " This program may be freely distributed on PD libraries."
Pen 4 : Print : Print : Print " LEGAL CRAP:" : Pen 2
Print " Although I have never known this program to fail I can not take any"
Print " responsibility for failure of this program or for human data entry error."
Pen 5 : Locate ,24 : Centre "Press enter to return to the options menu."
PP$=Chr$(13) : Gosub PAUSE : Gosub CSCREEN : Goto OPTIONS